package com.qfmy.web.app.config;



import com.qfmy.web.app.interceptor.webAppInterceptor;
import jakarta.annotation.Resource;
import org.jetbrains.annotations.NotNull;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author 清风明月
 * @Package com.lzw.breezeNovel.webApp.config
 * @date 2025/9/13
 * @description webMvc配置类
 */
@Configuration
@SuppressWarnings("all")
public class webConfig implements WebMvcConfigurer {

    /**
     * 注入拦截器
     */
    @Resource
    private webAppInterceptor authenticationInterceptor;

    /**
     * 注册拦截器
     * @param registry
     */
    @Override
    public void addInterceptors(@NotNull InterceptorRegistry registry) {
        registry.addInterceptor(this.authenticationInterceptor)
                .excludePathPatterns("/app/userInfo/login/**")
                .addPathPatterns("/app/**");
    }

}
